#include "monster.h"

CMonster::CMonster(LPD3DXSPRITE SpriteHandler, float XHandle, float YHandle, int ScreenWidth, int ScreenHeight)
	:CGravityObject(SpriteHandler, XHandle, YHandle, ScreenWidth, ScreenHeight)
{
	_is_died_by_skill = false;
	_is_died_by_trampled = false;
	_is_dead = false;
}

//Action 

void CMonster::_BeDoneBySkill() {}

void CMonster::_BeDoneByTrampled() {}

void CMonster::_StillAlive() {}

void CMonster::_Died() 
{
	_vx = 0;
	_is_dead = true;
	_y_pre = y_handle;
}

//=====Sub=====
void CMonster::SetChangeDirection()
{
	_vx_last *= -1;
}

void CMonster::SetAttackedBySkill()
{
	_g = Config::GRAVITY;
	_time_start_y = GetTickCount();
	_is_died_by_skill = true;
	_on_air = true;
	_Died();
	
}

void CMonster::SetAttackedByTrampled()
{
	_is_died_by_trampled = true;
	_Died();
}

bool CMonster::GetDead()
{
	return _is_dead;
}



